<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 我是注释,哈哈哈哈哈 -->
  我是文本,呵呵呵

  <div class="box">哈哈哈哈哈</div>
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
  </ul>
  <script>

    
    var bodyEl = document.body
    // 获取body的子元素
    var childElement = bodyEl.children
    // console.log(childElement)

    // 获取box
    var box1 = bodyEl.children[0]
    var box2 = bodyEl.firstElementChild
    console.log(box2)

    // 获取ul
    var ul1 = bodyEl.children[1]
    var ul2 = box2.nextElementSibling

    // 获取li
    var liList = ul2.children
    console.log(liList )
</script>
</body>

</html>